﻿@{
    ViewBag.ParentUrl = "/Ticket/OuttimeBack";
    ViewBag.Title = "过期退保";
}
@section header{
    <style>
        .profile-info-name {
            width: auto;
        }
    </style>
}
@section breadcrumb
{
    <ul class="breadcrumb">
        <li>
            <i class="ace-icon fa fa-home home-icon"></i>
            <a href="/">首页</a>
        </li>
        <li class="active">@ViewBag.Title</li>
    </ul><!-- .breadcrumb -->
}

<div class="row">
    <div class="col-xs-12">

        <div class="widget-box">
            <div class="widget-header widget-header-flat">
                <h4 class="smaller">
                    <i class="icon-search"></i>
                    @ViewBag.Title
                </h4>
            </div>

            <div class="widget-body">
                <div class="widget-main">

                    <div class="profile-user-info profile-user-info-striped">

                        <div class="profile-info-row">
                            <div class="profile-info-name"> 退保方式： </div>

                            <div class="profile-info-value">

                                <label class="inline">
                                    <input name="flag" type="radio" class="ace" value="1" checked="checked" />
                                    <span class="lbl middle"> 按保单号退保</span>
                                </label>

                                &nbsp; &nbsp; &nbsp;
                                <label class="inline">
                                    <input name="flag" type="radio" class="ace" value="2" />
                                    <span class="lbl middle"> 按单证号退保</span>
                                </label>
                            </div>
                        </div>


                        <div class="profile-info-row">
                            <div class="profile-info-name"> 单号： </div>

                            <div class="profile-info-value">
                                <textarea id="txtNo" class="input-large" placeholder="多个保单号以‘,’逗号分割，如：xxxx,xxxx"></textarea>
                            </div>
                        </div>


                    </div>

                    <div class="space-4"></div>

                    <div class="clearfix form-actions">
                        <div class="col-md-offset-3 col-md-9">
                            <button class="btn btn-info" type="button" id="btnSubmit">
                                <i class="ace-icon fa fa-check bigger-110"></i>
                                确定
                            </button>

                            &nbsp; &nbsp;
                            <button class="btn" type="reset">
                                <i class="ace-icon fa fa-undo bigger-110"></i>
                                重置
                            </button>
                        </div>
                    </div>
                    <div class="hr hr-24"></div>
                </div>
            </div>
        </div>

    </div>
</div>

@section footer{
    <script src="/assets/js/bootbox.min.js"></script>
    <script>
        $(function () {
            $('#btnSubmit').on('click', function () {

                var flag = $(':radio[name="flag"]:checked').val();
                var no = $("#txtNo").val();
                if (no == '') {
                    bootbox.alert("请输入相应的单号！");
                    return;
                }


                $.post('/order/OuttimeBack', { no: no, flag: flag }, function (o) {
                    //alert(o.Msg);
                    var rs = eval(o);
                    bootbox.alert(o.Msg);
                });
            });
        });
    </script>
}